const fs = require('fs')
const path = require('path')

// 加载当前文件夹下的所有模型
const files = fs.readdirSync(__dirname)
files.forEach((file) => {
  if (file === 'index.js') {
    return
  }
  const model = require(path.join(__dirname, file))
  global.model[model.modelName] = model
})